/*
 * @Author: szx
 * @Date: 2022-05-21 13:02:12
 * @LastEditTime: 2022-05-21 13:48:33
 * @Description:
 * @FilePath: \leetcode\900-999\961\961.js
 */
/**
 * @param {number[]} nums
 * @return {number}
 */
var repeatedNTimes = function (nums) {
    const found = new Set();
    for (const num of nums) {
        if (found.has(num)) {
            return num;
        }
        found.add(num);
    }
    // 不可能的情况
    return -1;
};
